package com.hujesse.controller;

import com.hujesse.mapper.SureMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
public class GoodsController {
    @Autowired
    private SureMapper sureMapper;
    @RequestMapping("/index")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.setViewName("index");
        modelAndView.addObject("list",sureMapper.good(1));
        return modelAndView;
    }
}
